
///
/// zhaoliang
///
/// 图片缓存工具类
///
/// 2022.6.14
///
///

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

Widget cacheImage(String imageUrl,{double height,double width}){
  return CachedNetworkImage(imageUrl: imageUrl ?? '',height: height,width: width,fit: BoxFit.fill,placeholder: (context,index){
    return Image.asset('assets/images/zwpic.jpeg',width: width,height: height,);
  },errorWidget: (context,msg,a){
    return Image.asset('assets/images/errorpic.jpeg',width: width,height:height,);
  },);
}

